package com.insigma.business.qrcode.soldier.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.GovEmployeeRoleDao;
import com.insigma.business.qrcode.soldier.dao.SoldierApplyCheckDao;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.entity.SoldierApplyCheckDO;
import com.insigma.business.qrcode.soldier.service.SoldierApplyCheckService;
import com.insigma.business.qrcode.soldier.service.SoldierApplyInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("soldierApplyCheckService")
public class SoldierApplyCheckServiceImpl implements SoldierApplyCheckService {

    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    @Autowired(required = false)
    private SoldierApplyCheckDao soldierApplyCheckDao;

    @Autowired(required = false)
    private GovEmployeeRoleDao govEmployeeRoleDao;


    private static Logger LOGGER = LoggerFactory.getLogger(SoldierApplyInfoService.class);

    @Override
    public Integer insert(final SoldierApplyCheckDO soldierApplyCheckDO) {
        soldierApplyCheckDO.setId(sequenceGenerator.genKey(SequenceNameConstant.SOLDIER_APPLY_CHECK_ID).toString());
        return soldierApplyCheckDao.insert(soldierApplyCheckDO);
    }

    @Override
    public List<SoldierApplyCheckDO> search(Long applyId) {
        return soldierApplyCheckDao.getList(applyId);
    }

    @Override
    public Integer delete(String applyId) {
        return soldierApplyCheckDao.delete(applyId);
    }

}
